package com.zrrd.homework._0520_0526.h4;

/**
 * @author WanJl
 * @version 1.0
 * @title User
 * @description
 * 一个实体类的标准结构：
 *      |-私有的属性
 *      |-共有的Getter和Setter方法
 *      |-无参构造方法
 *      |-全参构造方法
 *      |-toString方法
 * @create 2024/5/25
 */
public class User {
    private String name;
    private String username;
    private String password;

    public User() {
    }

    public User(String name, String username, String password) {
        this.name = name;
        this.username = username;
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
